package top.songxs.gmall.product.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.product.entity.BaseAttrValue;
import top.songxs.gmall.product.service.BaseAttrValueService;

import java.util.List;

@RestController
@RequestMapping("admin/product")
public class BaseAttrValueController {
    @Autowired
    private BaseAttrValueService baseAttrValueService;

    @GetMapping("getAttrValueList/{attrId}")
    public Result<List<BaseAttrValue>> getAttrValueList(@PathVariable("attrId") Long attrId){
        List<BaseAttrValue> lists = baseAttrValueService.getAttrValueList(attrId);
        return Result.build(lists, ResultCodeEnum.SUCCESS);

    }

}





















